package tr.edu.metu.is.mega.client.service;

import tr.edu.metu.is.mega.common.dto.UserDTO;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Asynch interface of {@link GwtAuthenticationService}.
 * 
 */
public interface GwtAuthenticationServiceAsync {

    /**
     * @see GwtAuthenticationService#login(String, String)
     */
    void login(String userName, String password, AsyncCallback<UserDTO> callback);

    /**
     * @see GwtAuthenticationService#getCurrentUser()
     */
    void getCurrentUser(AsyncCallback<UserDTO> callback);

    /**
     * @see GwtAuthenticationService#getFromSession()
     */
    void getFromSession(AsyncCallback<UserDTO> callback);

    /**
     * @see GwtAuthenticationService#logout()
     */
    void logout(AsyncCallback<Void> callback);

    /**
     * @see GwtAuthenticationService#updateCurrentUser(UserDTO)
     */
    void updateCurrentUser(UserDTO user, AsyncCallback<Void> callback);

}
